﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.UI.HtmlControls;
using LibraryO2S;

public partial class Administrator_account : System.Web.UI.Page
{

    //   tblAdministrators admin = new tblAdministrators();
    ConnectSQL cnts = new ConnectSQL();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        try
        {
            CollectionPager1.DataSource = cnts.GetTableWithCommandText("select * from tblAccount").DefaultView; //admin.tblAdministratorsSelectWithPaged(1, 1, int.MaxValue).DefaultView;
            CollectionPager1.DataBind();
            CollectionPager1.PageSize = 5;
            CollectionPager1.BindToControl = rptData;
            rptData.DataSource = CollectionPager1.DataSourcePaged;
            rptData.DataBind();
        }
        catch
        {
            divMessage.InnerHtml = O2S_Message.Warning("Cảnh Báo", "Chưa Có dữ liệu trong mục này!");
        }
    }


}